package org.zhouhe.vo;

import java.sql.Timestamp;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Report entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "report", catalog = "zpd0t1_db")
public class Report implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = -5533825282427358773L;
	private Integer reportId;
	private User user;
	private ReportType reportType;
	private String title;
	private Integer version;
	private String keywords;
	private String summary;
	private String imgName;
	private Integer pricePaper;
	private Integer priceElectron;
	private Integer priceTotal;
	private String publishInstitution;
	private Date publishDate;
	private String manifestations;
	private String orderTel;
	private String deliveryTime;
	private String deliveryMethod;
	private String fax;
	private String catalog;
	private Integer recommended;
	private String recommendTips;
	private Integer free;
	private Timestamp displayTime;
	private Timestamp createTime;
	private Timestamp updateTime;
	private Integer status;
	private Set<ReportReco> reportRecos = new HashSet<ReportReco>(0);
	private Set<ArticleReport> articleReports = new HashSet<ArticleReport>(0);
	private Set<ReportIndustry> reportIndustries = new HashSet<ReportIndustry>(0);

	// Constructors

	/** default constructor */
	public Report() {
	}

	/** full constructor */
	public Report(User user, ReportType reportType, String title, String keywords, String summary, String imgName, String catalog,
			Integer recommended, String recommendTips, String recommendPosition, Integer free, Timestamp displayTime, Timestamp createTime,
			Timestamp updateTime, Integer status, Set<ReportReco> reportRecos, Set<ArticleReport> articleReports, Set<ReportIndustry> reportIndustries) {
		this.user = user;
		this.reportType = reportType;
		this.title = title;
		this.keywords = keywords;
		this.summary = summary;
		this.imgName = imgName;
		this.catalog = catalog;
		this.recommended = recommended;
		this.recommendTips = recommendTips;
		this.free = free;
		this.displayTime = displayTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.status = status;
		this.reportRecos = reportRecos;
		this.articleReports = articleReports;
		this.reportIndustries = reportIndustries;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "report_id", unique = true, nullable = false)
	public Integer getReportId() {
		return this.reportId;
	}

	public void setReportId(Integer reportId) {
		this.reportId = reportId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "report_type_id")
	public ReportType getReportType() {
		return this.reportType;
	}

	public void setReportType(ReportType reportType) {
		this.reportType = reportType;
	}

	@Column(name = "title", length = 128)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "keywords", length = 256)
	public String getKeywords() {
		return this.keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	@Column(name = "summary", length = 65535)
	public String getSummary() {
		return this.summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	@Column(name = "img_name", length = 256)
	public String getImgName() {
		return this.imgName;
	}

	public void setImgName(String imgName) {
		this.imgName = imgName;
	}

	@Column(name = "price_paper")
	public Integer getPricePaper() {
		return this.pricePaper;
	}

	public void setPricePaper(Integer pricePaper) {
		this.pricePaper = pricePaper;
	}

	@Column(name = "price_electron")
	public Integer getPriceElectron() {
		return this.priceElectron;
	}

	public void setPriceElectron(Integer priceElectron) {
		this.priceElectron = priceElectron;
	}

	@Column(name = "price_total")
	public Integer getPriceTotal() {
		return this.priceTotal;
	}

	public void setPriceTotal(Integer priceTotal) {
		this.priceTotal = priceTotal;
	}

	@Column(name = "publish_institution", length = 128)
	public String getPublishInstitution() {
		return this.publishInstitution;
	}

	public void setPublishInstitution(String publishInstitution) {
		this.publishInstitution = publishInstitution;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "publish_date", length = 10)
	public Date getPublishDate() {
		return this.publishDate;
	}

	public void setPublishDate(Date publishDate) {
		this.publishDate = publishDate;
	}

	@Column(name = "manifestations", length = 128)
	public String getManifestations() {
		return this.manifestations;
	}

	public void setManifestations(String manifestations) {
		this.manifestations = manifestations;
	}

	@Column(name = "order_tel", length = 128)
	public String getOrderTel() {
		return this.orderTel;
	}

	public void setOrderTel(String orderTel) {
		this.orderTel = orderTel;
	}

	@Column(name = "delivery_time", length = 128)
	public String getDeliveryTime() {
		return this.deliveryTime;
	}

	public void setDeliveryTime(String deliveryTime) {
		this.deliveryTime = deliveryTime;
	}

	@Column(name = "delivery_method", length = 128)
	public String getDeliveryMethod() {
		return this.deliveryMethod;
	}

	public void setDeliveryMethod(String deliveryMethod) {
		this.deliveryMethod = deliveryMethod;
	}

	@Column(name = "fax", length = 64)
	public String getFax() {
		return this.fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	@Column(name = "catalog", length = 65535)
	public String getCatalog() {
		return this.catalog;
	}

	public void setCatalog(String catalog) {
		this.catalog = catalog;
	}

	@Column(name = "recommended")
	public Integer getRecommended() {
		return this.recommended;
	}

	public void setRecommended(Integer recommended) {
		this.recommended = recommended;
	}

	@Column(name = "recommend_tips", length = 65535)
	public String getRecommendTips() {
		return this.recommendTips;
	}

	public void setRecommendTips(String recommendTips) {
		this.recommendTips = recommendTips;
	}

	@Column(name = "free")
	public Integer getFree() {
		return this.free;
	}

	public void setFree(Integer free) {
		this.free = free;
	}

	@Column(name = "display_time", length = 19)
	public Timestamp getDisplayTime() {
		return this.displayTime;
	}

	public void setDisplayTime(Timestamp displayTime) {
		this.displayTime = displayTime;
	}

	@Column(name = "create_time", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_time", length = 19)
	public Timestamp getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "report")
	public Set<ReportReco> getReportRecos() {
		return this.reportRecos;
	}

	public void setReportRecos(Set<ReportReco> reportRecos) {
		this.reportRecos = reportRecos;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "report")
	public Set<ArticleReport> getArticleReports() {
		return this.articleReports;
	}

	public void setArticleReports(Set<ArticleReport> articleReports) {
		this.articleReports = articleReports;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, mappedBy = "report")
	public Set<ReportIndustry> getReportIndustries() {
		return this.reportIndustries;
	}

	public void setReportIndustries(Set<ReportIndustry> reportIndustries) {
		this.reportIndustries = reportIndustries;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "version")
	public Integer getVersion() {
		return version;
	}

}